package com.example.mobile2032021606129ly0415;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

public class MainActivity extends AppCompatActivity {
    String[] names={"李刚","丁运生","方华高","朱云贵","邹辉","杨文","朱元元","周正发","张伟","周丽","陈天云","陈敏"};
//使用适配器
    PeopleAdapter adapter=new PeopleAdapter(names);
    RecyclerView rvMainPeople;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        //定义适配器
       //
        rvMainPeople.findViewById(R.id.rv_main_people);
        rvMainPeople.setLayoutManager(new LinearLayoutManager(this));
        //
       PeopleAdapter adapter=new PeopleAdapter(names);

    }
}